/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * LoginEmpleados.java
 *
 * Created on 23/05/2011, 01:21:59 PM
 */

package GUI;

import Interfaz.Interfaz;
import javax.swing.ImageIcon;

/**
 *
 * @author Vane
 */
public class LoginEmpleados extends javax.swing.JFrame {

    /** Creates new form LoginEmpleados */
	private Interfaz laIntefaz;

    public LoginEmpleados(Interfaz laInterfaz) {
		this.laIntefaz=laInterfaz;
        initComponents();
		this.setLocationRelativeTo(null); // Cambiar icono de java en ventana
        this.setIconImage(new ImageIcon("src/imagenes/marketplus2.png").getImage());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jTUsuario = new javax.swing.JTextField();
        jBAceptar = new javax.swing.JButton();
        jBCancelar = new javax.swing.JButton();
        jPasswordField1 = new javax.swing.JPasswordField();
        jLabel4 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(390, 350));
        setResizable(false);
        getContentPane().setLayout(null);

        jLabel1.setFont(new java.awt.Font("Tempus Sans ITC", 3, 18));
        jLabel1.setText("Inicio de Sesion");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 0, 160, 25);

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel2.setText("Usuario:");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(70, 120, 60, 20);

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel3.setText("Clave:");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(70, 150, 70, 20);

        jTUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTUsuarioActionPerformed(evt);
            }
        });
        getContentPane().add(jTUsuario);
        jTUsuario.setBounds(140, 120, 190, 20);

        jBAceptar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jBAceptar.setText("Aceptar");
        jBAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAceptarActionPerformed(evt);
            }
        });
        getContentPane().add(jBAceptar);
        jBAceptar.setBounds(60, 190, 120, 30);

        jBCancelar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jBCancelar.setText("Ir a Pag Principal");
        jBCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCancelarActionPerformed(evt);
            }
        });
        getContentPane().add(jBCancelar);
        jBCancelar.setBounds(190, 190, 140, 30);
        getContentPane().add(jPasswordField1);
        jPasswordField1.setBounds(140, 150, 190, 20);

        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/9af3c91c766211f797d02ff38e79e50a.png"))); // NOI18N
        getContentPane().add(jLabel4);
        jLabel4.setBounds(10, 10, 380, 320);

        pack();
    }// </editor-fold>//GEN-END:initComponents

	private void jTUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTUsuarioActionPerformed
		// TODO add your handling code here:
}//GEN-LAST:event_jTUsuarioActionPerformed

	private void jBAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAceptarActionPerformed
		// TODO add your handling code here:
		
	}//GEN-LAST:event_jBAceptarActionPerformed

	private void jBCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCancelarActionPerformed
		// TODO add your handling code here:
		Principal iraPrincipal=new Principal(laIntefaz);
		iraPrincipal.setVisible(true);
		this.dispose();
}//GEN-LAST:event_jBCancelarActionPerformed

    /**
    * @param args the command line arguments
    */
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBAceptar;
    private javax.swing.JButton jBCancelar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPasswordField jPasswordField1;
    private javax.swing.JTextField jTUsuario;
    // End of variables declaration//GEN-END:variables

}
